home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / IEditor / Expanders / Gauge / funcs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-06-17  |  34.0 KB  |  1,374 lines

  1. /// Includes
  2. #define INTUI_V36_NAMES_ONLY
  3.  
  4. #include <exec/nodes.h>                 // exec
  5. #include <exec/lists.h>
  6. #include <exec/memory.h>
  7. #include <exec/types.h>
  8. #include <dos/dos.h>                    // dos
  9. #include <dos/dostags.h>
  10. #include <intuition/intuition.h>        // intuition
  11. #include <intuition/gadgetclass.h>
  12. #include <graphics/text.h>              // graphics
  13. #include <libraries/gadtools.h>         // libraries
  14. #include <libraries/reqtools.h>
  15. #include <clib/exec_protos.h>           // protos
  16. #include <clib/dos_protos.h>
  17. #include <clib/intuition_protos.h>
  18. #include <clib/reqtools_protos.h>
  19. #include <pragmas/exec_pragmas.h>       // pragmas
  20. #include <pragmas/dos_pragmas.h>
  21. #include <pragmas/intuition_pragmas.h>
  22. #include <pragmas/graphics_pragmas.h>
  23. #include <pragmas/gadtools_pragmas.h>
  24. #include <pragmas/reqtools_pragmas.h>
  25.  
  26. #include <stdarg.h>
  27. #include <string.h>
  28. #include <stdio.h>
  29. #include <stdlib.h>
  30. #include <ctype.h>
  31.  
  32. #include "DEV_IE:Expanders/defs.h"
  33. #include "Edit.h"
  34. ///
  35. /// Prototypes
  36. static void     FGetString( BPTR, STRPTR );
  37. static void     PutString( BPTR, STRPTR );
  38.  
  39. /* we use a cut-down version of the ObjectInfo */
  40. struct GaugeInfo {
  41.     struct  Node gi_Node;
  42.     UWORD   gi_Kind;
  43.     UBYTE   gi_Flags;
  44.     UBYTE   gi_Pad;
  45.     APTR    gi_Reserved;
  46.     UBYTE   gi_Reserved2[80];
  47.     UBYTE   gi_Label[40];
  48.     WORD    gi_User1;
  49.     WORD    gi_Freedom; /* 0 = Horizontal, 1 = Vertical */
  50.     WORD    gi_Left;
  51.     WORD    gi_Top;
  52.     UWORD   gi_Width;
  53.     UWORD   gi_Height;
  54. };
  55. ///
  56.  
  57.  
  58.  
  59. /// I/O support functions
  60. void FGetString( BPTR File, STRPTR str )
  61. {
  62.     UBYTE   len;
  63.  
  64.     len = FGetC( File );
  65.  
  66.     FRead( File, str, len, 1 );
  67.  
  68.     str[ len ] = '\0';
  69.  
  70.     if(!( len & 1 ))
  71.     FGetC( File );
  72. }
  73.  
  74. void PutString( BPTR File, STRPTR str )
  75. {
  76.     UBYTE   len;
  77.  
  78.     len = strlen( str );
  79.  
  80.     FPutC( File, len );
  81.     FWrite( File, str, len, 1 );
  82.  
  83.     if(!( len & 1 ))
  84.     FPutC( File, 0 );
  85. }
  86. ///
  87.  
  88.  
  89. /*  Starting function           */
  90. /// IEX_Mount Doc
  91. /****** expander.library/IEX_Mount ******************************************
  92. *
  93. *   NAME
  94. *       IEX_Mount  -  Provide expander informations
  95. *
  96. *   SYNOPSIS
  97. *       error = IEX_Mount( IE_Data );
  98. *                            A0
  99. *
  100. *       ULONG IEX_Mount( struct IE_Data * );
  101. *
  102. *   FUNCTION
  103. *       This function is called by IEditor before first usage of the
  104. *       expander. The expander should fill its base with informations
  105. *       about its abilities and open its source description file.
  106. *
  107. *   INPUTS
  108. *       IE_Data -   information about IE
  109. *
  110. *   RESULT
  111. *       error   -   IEX_OK or an error code
  112. *
  113. *   NOTES
  114. *
  115. *   BUGS
  116. *
  117. *   SEE ALSO
  118. *       IEditor/Expander.h
  119. *
  120. *****************************************************************************
  121. *
  122. */
  123. ///
  124. /// IEX_Mount
  125. __geta4 ULONG IEX_Mount( __A0 struct IE_Data *IE )
  126. {
  127.     BPTR                    DescFile;
  128.     struct FileInfoBlock   *fib;
  129.     ULONG                   ret = IEX_ERROR_NO_DESC_FILE;
  130.     static UBYTE            FileName[] = "PROGDIR:Expanders/Gauge.desc";
  131.  
  132.     Forbid();   /* we're going to write to a GLOBAL variable */
  133.  
  134.     if( Desc ) {            /* already mounted? */
  135.     Permit();
  136.     return( IEX_OK );
  137.     }
  138.  
  139.     LibBase->Kind      = IEX_OBJECT_KIND;
  140.  
  141.     LibBase->Resizable = TRUE;
  142.     LibBase->Movable   = TRUE;
  143.     LibBase->HasItems  = FALSE;
  144.     LibBase->UseFonts  = FALSE;
  145.  
  146.     LibBase->Node.ln_Name = "FUEL GAUGE";
  147.  
  148.     if( fib = AllocDosObject( DOS_FIB, NULL )) {
  149.     if( DescFile = Lock( FileName, ACCESS_READ )) {
  150.  
  151.         Examine( DescFile, fib );
  152.         UnLock( DescFile );
  153.  
  154.         if( Desc = AllocVec( fib->fib_Size, 0L )) {
  155.         if( DescFile = Open( FileName, MODE_OLDFILE )) {
  156.  
  157.             Read( DescFile, Desc, fib->fib_Size );
  158.             Close( DescFile );
  159.  
  160.             ( *IE->IEXFun->SplitLines )( Desc ); // VERY important!
  161.  
  162.             STRPTR pri;
  163.  
  164.             pri = ( *IE->IEXFun->GetFirstLine )( Desc, "RENDPRI" );
  165.  
  166.             if( pri )
  167.             LibBase->Node.ln_Pri = atoi( pri );
  168.             else
  169.             LibBase->Node.ln_Pri = 0;
  170.  
  171.             ret = IEX_OK;
  172.  
  173.         } else {
  174.             FreeVec( Desc );
  175.             Desc = NULL;
  176.         }
  177.         }
  178.  
  179.     }
  180.  
  181.     FreeDosObject( DOS_FIB, fib );
  182.     }
  183.  
  184.     Permit();
  185.  
  186.     return( ret );
  187. }
  188. ///
  189.  
  190.  
  191. /*  Edit functions              */
  192. /// IEX_Add Doc
  193. /****** expander.library/IEX_Add ********************************************
  194. *
  195. *   NAME
  196. *       IEX_Add  -  Add an object to the active window
  197. *
  198. *   SYNOPSIS
  199. *       success = IEX_Add( ID, IE_Data, x, y, width, heigth );
  200. *                          D0    A0     D1 D2  D3      D4
  201. *
  202. *       BOOL IEX_Add( UWORD, struct IE_Data *, WORD, WORD, UWORD, UWORD );
  203. *
  204. *   FUNCTION
  205. *       This function is called by IEditor when the user selects the
  206. *       name of our object from the Add Gadget list.
  207. *       If our object can be moved and resized, the user will be asked
  208. *       to draw it (like gadtools gadgets) and then IE will call this
  209. *       function with the coordinates and the size of the drawn box.
  210. *
  211. *       If your object needs a label for the source, you must provide
  212. *       it, in the case the user doesn't want to type it in.
  213. *       E.g.
  214. *                   sprintf( Obj->Label, "%sGad%03ld",
  215. *                            IE->win_info->wi_Label,
  216. *                            IE->win_info->wi_NewGadID );
  217. *                   IE.win_info->wi_NewGadID += 1;
  218. *
  219. *
  220. *       You must also update the IE->win_info->wi_NumObjects variable.
  221. *
  222. *   INPUTS
  223. *       ID          -   ID assigned by IE. You MUST put it in the o_Kind
  224. *                       field.
  225. *       IE_Data     -   information about IE
  226. *       x, y        -   top left corner of the box drawn by the user
  227. *       width, height - size of the box
  228. *
  229. *   RESULT
  230. *       success     -   TRUE for success, FALSE for failure
  231. *
  232. *   NOTES
  233. *
  234. *   BUGS
  235. *
  236. *   SEE ALSO
  237. *       IEditor/Expander.h, IEX_Remove()
  238. *
  239. *****************************************************************************
  240. *
  241. */
  242. ///
  243. /// IEX_Add
  244. __geta4 BOOL IEX_Add( __D0 UWORD ID, __A0 struct IE_Data *IE, __D1 WORD x, __D2 WORD y, __D3 UWORD width, __D4 UWORD height )
  245. {
  246.     struct GaugeInfo   *gauge;
  247.     BOOL                ret = FALSE;
  248.  
  249.     if( gauge = AllocMem( sizeof( struct GaugeInfo ), MEMF_CLEAR )) {
  250.  
  251.     gauge->gi_Kind   = ID;       /* DON'T FORGET!!! */
  252.     gauge->gi_Left   = x;
  253.     gauge->gi_Top    = y;
  254.     gauge->gi_Width  = width;
  255.     gauge->gi_Height = height;
  256.     gauge->gi_Flags  = G_ATTIVO; /* make it active  */
  257.  
  258.     sprintf( gauge->gi_Label, "%sGad%03ld",
  259.          IE->win_info->wi_Label,
  260.          IE->win_info->wi_NewGadID );
  261.     IE->win_info->wi_NewGadID += 1;
  262.  
  263.     /* add our object to the list */
  264.     AddTail((struct List *)&IE->win_info->wi_Gadgets, (struct Node *)gauge );
  265.  
  266.     IE->win_info->wi_NumObjects += 1;
  267.  
  268.     ret = TRUE;
  269.     }
  270.  
  271.     return( ret );
  272. }
  273. ///
  274. /// IEX_Remove Doc
  275. /****** expander.library/IEX_Remove *****************************************
  276. *
  277. *   NAME
  278. *       IEX_Remove  -  Remove our objects
  279. *
  280. *   SYNOPSIS
  281. *       IEX_Remove( ID, IE_Data );
  282. *                   D0     A0
  283. *
  284. *       void IEX_Remove( UWORD, struct IE_Data * );
  285. *
  286. *   FUNCTION
  287. *       IEditor calls this function when the user wants to delete
  288. *       some objects it doesn't know.
  289. *       You should then remove all the object whose o_Kind field
  290. *       is equal to the ID passed by IE  *AND*  that are selected
  291. *       (check the G_ATTIVO flag in o_flags2).
  292. *
  293. *       This function is called alse when deleting a window or
  294. *       freeing the GUI: of course, all objects will be selected.
  295. *
  296. *   INPUTS
  297. *       ID          -   your ID
  298. *       IE_Data     -   information about IE
  299. *
  300. *   RESULT
  301. *
  302. *   NOTES
  303. *       Don't forget to update the IE->win_info->wi_NumObjects variable!
  304. *
  305. *   BUGS
  306. *
  307. *   SEE ALSO
  308. *       IEditor/Expander.h, IEX_Add()
  309. *
  310. *****************************************************************************
  311. *
  312. */
  313. ///
  314. /// IEX_Remove
  315. __geta4 void IEX_Remove( __D0 UWORD ID, __A0 struct IE_Data *IE )
  316. {
  317.     struct GaugeInfo   *gauge, *next;
  318.  
  319.     for( gauge = IE->win_info->wi_Gadgets.mlh_Head; gauge->gi_Node.ln_Succ; gauge = gauge->gi_Node.ln_Succ ) {
  320.     /* remove only the objects of our kind and that are selected  */
  321.     if(( gauge->gi_Kind == ID ) && ( gauge->gi_Flags & G_ATTIVO )) {
  322.         next = gauge->gi_Node.ln_Pred;
  323.  
  324.         Remove(( struct Node * )gauge );
  325.  
  326.         IE->win_info->wi_NumObjects -= 1;
  327.  
  328.         FreeMem( gauge, sizeof( struct GaugeInfo ));
  329.         gauge = next;
  330.     }
  331.     }
  332. }
  333. ///
  334. /// IEX_Edit Doc
  335. /****** expander.library/IEX_Edit *******************************************
  336. *
  337. *   NAME
  338. *       IEX_Edit  -  Edit our objects
  339. *
  340. *   SYNOPSIS
  341. *       edited = IEX_Edit( ID, IE_Data );
  342. *                          D0     A0
  343. *
  344. *       BOOL IEX_Edit( UWORD, struct IE_Data * );
  345. *
  346. *   FUNCTION
  347. *       IEditor calls this function when the user wants to edit
  348. *       some objects it doesn't know.
  349. *       You should then open your edit window on IEditor's screen
  350. *       for all objects whose o_Kind field is equal to the ID passed
  351. *       by IE  *AND*  that are selected (check the G_ATTIVO flag in
  352. *       o_flags2).
  353. *       If your expander doesn't support the edit function, it MUST
  354. *       return FALSE.
  355. *
  356. *   INPUTS
  357. *       ID          -   your ID
  358. *       IE_Data     -   information about IE
  359. *
  360. *   RESULT
  361. *       edited      -   TRUE if the user changed some object params,
  362. *                       otherwise FALSE
  363. *
  364. *   NOTES
  365. *       You can find very comfortable to generate the GUI for your
  366. *       expanders using the C_IE_Mod.generator.
  367. *
  368. *   BUGS
  369. *
  370. *   SEE ALSO
  371. *       IEditor/Expander.h
  372. *
  373. *****************************************************************************
  374. *
  375. */
  376. ///
  377. /// IEX_Edit
  378. __geta4 BOOL IEX_Edit( __D0 UWORD ID, __A0 struct IE_Data *IE )
  379. {
  380.     BOOL                ret = FALSE;
  381.     WORD                rt;
  382.     struct GaugeInfo   *gauge;
  383.     struct Window      *Wnd;
  384.     struct Gadget      *GList, *Gadgets[ Main_CNT ];
  385.  
  386.     for( gauge = IE->win_info->wi_Gadgets.mlh_Head; gauge->gi_Node.ln_Succ; gauge = gauge->gi_Node.ln_Succ ) {
  387.     if(( gauge->gi_Kind == ID ) && ( gauge->gi_Flags & G_ATTIVO )) {
  388.  
  389.         GList = NULL;
  390.  
  391.         if( OpenMainWindow( &Wnd, &GList, &Gadgets[0], IE )) {
  392.  
  393.         (*IE->Functions->Status)( "Cannot open my window!", TRUE, 0 );
  394.  
  395.         } else {
  396.  
  397.         GT_SetGadgetAttrs( Gadgets[ GD_Label ], Wnd, NULL,
  398.                    GTST_String, gauge->gi_Label, TAG_END );
  399.  
  400.         GT_SetGadgetAttrs( Gadgets[ GD_Free ], Wnd, NULL,
  401.                    GTMX_Active, gauge->gi_Freedom, TAG_END );
  402.  
  403.         UBYTE BackFree = gauge->gi_Freedom;
  404.  
  405.         IE->UserData = gauge;
  406.  
  407.         do {
  408.             WaitPort( Wnd->UserPort );
  409.             rt = HandleMainIDCMP( Wnd, &Gadgets[0], IE );
  410.         } while( rt == 0 );
  411.  
  412.         if( rt > 0 ) {
  413.             gauge->gi_Freedom = BackFree;
  414.         } else {
  415.  
  416.             STRPTR label;
  417.  
  418.             label = GetString( Gadgets[ GD_Label ] );
  419.  
  420.             if( label[0] )
  421.             strcpy( gauge->gi_Label, label );
  422.  
  423.             ret = TRUE;  /*  VERY important !!!  */
  424.         }
  425.         }
  426.  
  427.         CloseWnd( &Wnd, &GList );
  428.     }
  429.     }
  430.  
  431.     return( ret );
  432. }
  433.  
  434. /*
  435.     C source code created by Interface Editor
  436.     Copyright © 1994-1996 by Simone Tellini
  437.  
  438.     Generator:  C_IE_Mod.generator 37.0 (15.2.96)
  439.  
  440.     Copy registered to :  Simone Tellini
  441.     Serial Number      : #0
  442. */
  443.  
  444. /*
  445.    In this file you'll find empty  template  routines
  446.    referenced in the GUI source.  You  can fill these
  447.    routines with your code or use them as a reference
  448.    to create your main program.
  449. */
  450.  
  451. BOOL MainVanillaKey( UBYTE code, struct Window *Wnd, struct Gadget *Gadgets[], struct IE_Data *IE )
  452. {
  453.     switch( code ) {
  454.     case 13:
  455.         return( -1 );
  456.         break;
  457.     case 27:
  458.         return( 1 );
  459.         break;
  460.     }
  461.  
  462.     return( 0 );
  463. }
  464.  
  465. BOOL OkKeyPressed( struct Window *Wnd, struct Gadget *Gadgets[], struct IE_Data *IE, struct IntuiMessage *Msg )
  466. {
  467.     return( -1 );
  468. }
  469.  
  470. BOOL CancKeyPressed( struct Window *Wnd, struct Gadget *Gadgets[], struct IE_Data *IE, struct IntuiMessage *Msg )
  471. {
  472.     return( 1 );
  473. }
  474.  
  475. BOOL FreeKeyPressed( struct Window *Wnd, struct Gadget *Gadgets[], struct IE_Data *IE, struct IntuiMessage *Msg )
  476. {
  477.     Msg->Code = ((struct GaugeInfo *)IE->UserData)->gi_Freedom ? 0 : 1;
  478.  
  479.     GT_SetGadgetAttrs( Gadgets[ GD_Free ], Wnd, NULL,
  480.                GTMX_Active, Msg->Code, TAG_END );
  481.  
  482.     return FreeClicked( Wnd, Gadgets, IE, Msg );
  483. }
  484.  
  485. BOOL OkClicked( struct Window *wnd, struct Gadget *Gadgets[], struct IE_Data *IE, struct IntuiMessage *Msg )
  486. {
  487.     return( -1 );
  488. }
  489.  
  490. BOOL CancClicked( struct Window *wnd, struct Gadget *Gadgets[], struct IE_Data *IE, struct IntuiMessage *Msg )
  491. {
  492.     return( 1 );
  493. }
  494.  
  495. BOOL FreeClicked( struct Window *wnd, struct Gadget *Gadgets[], struct IE_Data *IE, struct IntuiMessage *Msg )
  496. {
  497.  
  498.     ((struct GaugeInfo *)IE->UserData)->gi_Freedom = Msg->Code;
  499.     return( 0 );
  500. }
  501.  
  502. BOOL LabelClicked( struct Window *wnd, struct Gadget *Gadgets[], struct IE_Data *IE, struct IntuiMessage *Msg )
  503. {
  504.     return( 0 );
  505. }
  506. ///
  507. /// IEX_Copy Doc
  508. /****** expander.library/IEX_Copy *******************************************
  509. *
  510. *   NAME
  511. *       IEX_Copy  -  Copy our objects
  512. *
  513. *   SYNOPSIS
  514. *       success = IEX_Copy( ID, IE_Data, offx, offy );
  515. *                           D0     A0     D1    D2
  516. *
  517. *       BOOL IEX_Copy( UWORD, struct IE_Data *, WORD, WORD );
  518. *
  519. *   FUNCTION
  520. *       IEditor calls this function when the user wants to copy
  521. *       some objects it doesn't know.
  522. *
  523. *   INPUTS
  524. *       ID          -   your ID
  525. *       IE_Data     -   information about IE
  526. *       offx, offy  -   offset of the copy
  527. *
  528. *   RESULT
  529. *       success     -   TRUE if succeeded, FALSE if there was no
  530. *                       enough memory
  531. *
  532. *   NOTES
  533. *
  534. *   BUGS
  535. *
  536. *   SEE ALSO
  537. *       IEditor/Expander.h
  538. *
  539. *****************************************************************************
  540. *
  541. */
  542. ///
  543. /// IEX_Copy
  544. __geta4 BOOL IEX_Copy( __D0 UWORD ID, __A0 struct IE_Data *IE, __D1 WORD offx, __D2 WORD offy )
  545. {
  546.     struct GaugeInfo   *gauge, *copy;
  547.  
  548.     for( gauge = IE->win_info->wi_Gadgets.mlh_Head; gauge->gi_Node.ln_Succ; gauge = gauge->gi_Node.ln_Succ ) {
  549.     if(( gauge->gi_Kind == ID ) && ( gauge->gi_Flags & G_ATTIVO )) {
  550.  
  551.         if( copy = AllocMem( sizeof( struct GaugeInfo ), 0L )) {
  552.  
  553.         CopyMem((char *)gauge, (char *)copy, (long)sizeof( struct GaugeInfo ));
  554.  
  555.         AddTail((struct List *)&IE->win_info->wi_Gadgets, (struct Node *)copy );
  556.  
  557.         IE->win_info->wi_NumObjects += 1; /* Don't forget! */
  558.  
  559.         copy->gi_Left += offx;  /* update its position */
  560.         copy->gi_Top  += offy;
  561.  
  562.         /* I don't want a neverending loop... ;-) */
  563.         copy->gi_Flags &= ~G_ATTIVO;
  564.  
  565.         } else
  566.         return( FALSE );
  567.     }
  568.     }
  569.  
  570.     return( TRUE );
  571. }
  572. ///
  573. /// IEX_Make Doc
  574. /****** expander.library/IEX_Make *******************************************
  575. *
  576. *   NAME
  577. *       IEX_Make  -  Put our objects on the window
  578. *
  579. *   SYNOPSIS
  580. *       next_gadget = IEX_Make( ID, IE_Data, GList );
  581. *                               D0     A0     A1
  582. *
  583. *       struct Gadget *IEX_Make( UWORD, struct IE_Data *, struct Gadget * );
  584. *
  585. *   FUNCTION
  586. *       IEditor calls this function before opening a window or after
  587. *       the user has selected 'Gadget/Tags...' and he has done some
  588. *       change.
  589. *
  590. *   INPUTS
  591. *       ID          -   your ID
  592. *       IE_Data     -   information about IE
  593. *       GList       -   gadget list to which append yours.
  594. *
  595. *   RESULT
  596. *       next_gadget -   a pointer to the last gadget you've created
  597. *                       or NULL for failure.
  598. *
  599. *   NOTES
  600. *       NOTE WELL: the window of your object could be closed when IE
  601. *                  calls this function!!!
  602. *
  603. *   BUGS
  604. *
  605. *   SEE ALSO
  606. *       IEditor/Expander.h, IEX_Refresh()
  607. *
  608. *****************************************************************************
  609. *
  610. */
  611. ///
  612. /// IEX_Make
  613. __geta4 struct Gadget *IEX_Make( __D0 UWORD ID, __A0 struct IE_Data *IE, __A1 struct Gadget *glist )
  614. {
  615.     /*  We don't need to make anything  */
  616.     return( glist );
  617. }
  618. ///
  619. /// IEX_Free Doc
  620. /****** expander.library/IEX_Free *******************************************
  621. *
  622. *   NAME
  623. *       IEX_Free  -  Free all the unused memory when the window is closed
  624. *
  625. *   SYNOPSIS
  626. *       IEX_Free( ID, IE_Data );
  627. *                 D0     A0
  628. *
  629. *       void IEX_Free( UWORD, struct IE_Data * );
  630. *
  631. *   FUNCTION
  632. *       IEditor calls this function after closing a window.
  633. *       You must then release all the memory you can (e.g. when
  634. *       IE closes a window, it FreeGadgets() its GList).
  635. *
  636. *   INPUTS
  637. *       ID          -   your ID
  638. *       IE_Data     -   information about IE
  639. *
  640. *   RESULT
  641. *
  642. *   NOTES
  643. *
  644. *   BUGS
  645. *
  646. *   SEE ALSO
  647. *       IEditor/Expander.h
  648. *
  649. *****************************************************************************
  650. *
  651. */
  652. ///
  653. /// IEX_Free
  654. __geta4 void IEX_Free( __D0 UWORD ID, __A0 struct IE_Data *IE )
  655. {
  656.     /*  We've got nothing to free when the window is closed  */
  657. }
  658. ///
  659. /// IEX_Refresh Doc
  660. /****** expander.library/IEX_Refresh ****************************************
  661. *
  662. *   NAME
  663. *       IEX_Refresh  -  Refresh your objects
  664. *
  665. *   SYNOPSIS
  666. *       IEX_Refresh( ID, IE_Data );
  667. *                    D0     A0
  668. *
  669. *       void IEX_Refresh( UWORD, struct IE_Data * );
  670. *
  671. *   FUNCTION
  672. *       IEditor calls this function when the window needs refreshing.
  673. *       If your objects have some graphic element that can be corrupted,
  674. *       you must redrawn it, or refresh them in some way.
  675. *
  676. *   INPUTS
  677. *       ID          -   your ID
  678. *       IE_Data     -   information about IE
  679. *
  680. *   RESULT
  681. *
  682. *   NOTES
  683. *
  684. *   BUGS
  685. *
  686. *   SEE ALSO
  687. *       IEditor/Expander.h, IEX_Make()
  688. *
  689. *****************************************************************************
  690. *
  691. */
  692. ///
  693. /// IEX_Refresh
  694. __geta4 void IEX_Refresh( __D0 UWORD ID, __A0 struct IE_Data *IE )
  695. {
  696.     struct GaugeInfo *gauge;
  697.  
  698.     for( gauge = IE->win_info->wi_Gadgets.mlh_Head; gauge->gi_Node.ln_Succ; gauge = gauge->gi_Node.ln_Succ ) {
  699.     /*  always check the Kind  */
  700.     if( gauge->gi_Kind == ID ) {
  701.  
  702.         DrawBevelBox( IE->win_active->RPort,
  703.               gauge->gi_Left, gauge->gi_Top,
  704.               gauge->gi_Width, gauge->gi_Height,
  705.               GTBB_Recessed, TRUE,
  706.               GT_VisualInfo, IE->ScreenData->Visual, TAG_DONE );
  707.  
  708.         SetAPen( IE->win_active->RPort, 0 );
  709.         RectFill( IE->win_active->RPort,
  710.               gauge->gi_Left + 2, gauge->gi_Top + 1,
  711.               gauge->gi_Left + gauge->gi_Width  - 3,
  712.               gauge->gi_Top  + gauge->gi_Height - 2  );
  713.     }
  714.     }
  715. }
  716. ///
  717.  
  718.  
  719. /*  I/O Functions               */
  720. /// IEX_Save Doc
  721. /****** expander.library/IEX_Save *******************************************
  722. *
  723. *   NAME
  724. *       IEX_Save  -  Save our objects in the file
  725. *
  726. *   SYNOPSIS
  727. *       IEX_Save( ID, IE_Data, File );
  728. *                 D0     A0     D1
  729. *
  730. *       void IEX_Save( UWORD, struct IE_Data *, BPTR );
  731. *
  732. *   FUNCTION
  733. *       IEditor calls this function only if we have some object
  734. *       in the GUI. We must then save in the provided file all
  735. *       the objects found in the win_info list that have the right ID .
  736. *
  737. *       We must also check the G_ATTIVO flag, since this function is
  738. *       called also when the user selects "Gadgets/Save..."
  739. *
  740. *   INPUTS
  741. *       ID          -   your ID
  742. *       IE_Data     -   information about IE
  743. *       File        -   BPTR of the file
  744. *
  745. *   RESULT
  746. *
  747. *   NOTES
  748. *
  749. *   BUGS
  750. *
  751. *   SEE ALSO
  752. *       IEditor/Expander.h, IEX_Load()
  753. *
  754. *****************************************************************************
  755. *
  756. */
  757. ///
  758. /// IEX_Save
  759. __geta4 void IEX_Save( __D0 UWORD ID, __A0 struct IE_Data *IE, __D1 BPTR File )
  760. {
  761.     struct GaugeInfo   *gauge;
  762.  
  763.     for( gauge = IE->win_info->wi_Gadgets.mlh_Head; gauge->gi_Node.ln_Succ; gauge = gauge->gi_Node.ln_Succ ) {
  764.     if(( gauge->gi_Kind == ID ) && ( gauge->gi_Flags & G_ATTIVO )) {
  765.         PutString( File, gauge->gi_Label );
  766.         FWrite( File, &gauge->gi_Freedom, 10, 1 );
  767.     }
  768.     }
  769. }
  770. ///
  771. /// IEX_Load Doc
  772. /****** expander.library/IEX_Load *******************************************
  773. *
  774. *   NAME
  775. *       IEX_Load  -  Load our objects from the file
  776. *
  777. *   SYNOPSIS
  778. *       success = IEX_Load( ID, IE_Data, File, Num );
  779. *                           D0     A0     D1   D2
  780. *
  781. *       BOOL IEX_Load( UWORD, struct IE_Data *, BPTR, UWORD );
  782. *
  783. *   FUNCTION
  784. *       IEditor calls this function to load some object from a file.
  785. *
  786. *       We must then load <Num> objects and link them to the
  787. *       win_info's list.
  788. *
  789. *   INPUTS
  790. *       ID          -   your ID
  791. *       IE_Data     -   information about IE
  792. *       File        -   BPTR of the file
  793. *       Num         -   number of objects to load
  794. *
  795. *   RESULT
  796. *       success     -   TRUE for success, FALSE otherwise (= out of mem)
  797. *
  798. *   NOTES
  799. *
  800. *   BUGS
  801. *
  802. *   SEE ALSO
  803. *       IEditor/Expander.h, IEX_Save()
  804. *
  805. *****************************************************************************
  806. *
  807. */
  808. ///
  809. /// IEX_Load
  810. __geta4 BOOL IEX_Load( __D0 UWORD ID, __A0 struct IE_Data *IE, __D1 BPTR File, __D2 UWORD Num )
  811. {
  812.     struct GaugeInfo   *gauge;
  813.     UWORD               cnt;
  814.  
  815.     for( cnt = 0; cnt < Num; cnt++ ) {
  816.     if( gauge = AllocMem( sizeof( struct GaugeInfo ), MEMF_CLEAR )) {
  817.  
  818.         gauge->gi_Kind = ID;  /* VERY important!!! */
  819.  
  820.         AddTail(( struct List * )&IE->win_info->wi_Gadgets, ( struct Node * )gauge );
  821.  
  822.         FGetString( File, gauge->gi_Label );
  823.         FRead( File, &gauge->gi_Freedom, 10, 1 );
  824.  
  825.     } else
  826.         return( FALSE );
  827.     }
  828.  
  829.     return( TRUE );
  830. }
  831. ///
  832.  
  833.  
  834. /*  Source related functions    */
  835. /// IEX_StartSrcGen Doc
  836. /****** expander.library/IEX_StartSrcGen ************************************
  837. *
  838. *   NAME
  839. *       IEX_StartSrcgen  -  Are you ready to generate the source? ;-)
  840. *
  841. *   SYNOPSIS
  842. *       support_function = IEX_StartSrcGen( ID, IE_Data );
  843. *                                           D0     A0
  844. *
  845. *       STRPTR IEX_StartSrcGen( UWORD, struct IE_Data * );
  846. *
  847. *   FUNCTION
  848. *       IEditor calls this function just before generating the source.
  849. *       The expander should then walk through the window list, setting
  850. *       the right fields of the window info structures in order to
  851. *       let IE know what it need to put in the source.
  852. *
  853. *       Then, the expander must return a STRPTR to its support
  854. *       function(s), if any. They will be written in the source by IE,
  855. *       that will filter out any duplicate function.
  856. *
  857. *   INPUTS
  858. *       ID          -   your ID
  859. *       IE_Data     -   information about IE
  860. *
  861. *   RESULT
  862. *       support_function -  STRPTR to a support function(s) or NULL
  863. *
  864. *   NOTES
  865. *
  866. *   BUGS
  867. *
  868. *   SEE ALSO
  869. *       IEditor/Expander.h
  870. *
  871. *****************************************************************************
  872. *
  873. */
  874. ///
  875. /// IEX_StartSrcGen
  876. __geta4 STRPTR IEX_StartSrcGen( __D0 UWORD ID, __A0 struct IE_Data *IE )
  877. {
  878.     struct WindowInfo  *wnd;
  879.     struct GaugeInfo   *gauge;
  880.     STRPTR              func;
  881.  
  882.     for( wnd = IE->win_list.mlh_Head; wnd->wi_succ; wnd = wnd->wi_succ ) {
  883.     if( wnd->wi_NumObjects ) {
  884.         for( gauge = wnd->wi_Gadgets.mlh_Head; gauge->gi_Node.ln_Succ; gauge = gauge->gi_Node.ln_Succ ) {
  885.         if( gauge->gi_Kind == ID )
  886.             wnd->wi_NeedRender = TRUE;
  887.         }
  888.     }
  889.     }
  890.  
  891.     func = ( IE->SrcFlags & FONTSENSITIVE ) ? "SUPPORT-FA" : "SUPPORT";
  892.  
  893.     return(( *IE->IEXFun->GetFirstLine )( Desc, func ));
  894. }
  895. ///
  896. /// IEX_WriteGlobals Doc
  897. /****** expander.library/IEX_WriteGlobals ***********************************
  898. *
  899. *   NAME
  900. *       IEX_WriteGlobals  -  Write your global variables
  901. *
  902. *   SYNOPSIS
  903. *       IEX_WriteGlobals( ID, GenFiles, IE_Data );
  904. *                         D0     A0        A1
  905. *
  906. *       void IEX_WriteGlobals( UWORD, struct GenFiles *, struct IE_Data * );
  907. *
  908. *   FUNCTION
  909. *       Write your global variables into the GenFiles->XDef file.
  910. *
  911. *   INPUTS
  912. *       ID          -   your ID
  913. *       GenFiles    -   file BPTRs
  914. *       IE_Data     -   information about IE
  915. *
  916. *   RESULT
  917. *
  918. *   NOTES
  919. *
  920. *   BUGS
  921. *
  922. *   SEE ALSO
  923. *       IEditor/Expander.h, IEditor/generatorlib.h
  924. *
  925. *****************************************************************************
  926. *
  927. */
  928. ///
  929. /// IEX_WriteGlobals
  930. __geta4 void IEX_WriteGlobals( __D0 UWORD ID, __A0 struct GenFiles *Files, __A1 struct IE_Data *IE )
  931. {
  932. }
  933. ///
  934. /// IEX_WriteSetup Doc
  935. /****** expander.library/IEX_WriteSetup *************************************
  936. *
  937. *   NAME
  938. *       IEX_WriteSetup  -  Write your setup routine
  939. *
  940. *   SYNOPSIS
  941. *       IEX_WriteSetup( ID, GenFiles, IE_Data );
  942. *                       D0     A0        A1
  943. *
  944. *       void IEX_WriteSetup( UWORD, struct GenFiles *, struct IE_Data * );
  945. *
  946. *   FUNCTION
  947. *       This function is invoked in the SetupScreen routine, after
  948. *       the screen locking or opening and after the call to
  949. *       GetVisualInfo().
  950. *
  951. *       This can be useful if you need to alloc or do something
  952. *       just once before any window is opened.
  953. *
  954. *   INPUTS
  955. *       ID          -   your ID
  956. *       GenFiles    -   file BPTRs
  957. *       IE_Data     -   information about IE
  958. *
  959. *   RESULT
  960. *
  961. *   NOTES
  962. *
  963. *   BUGS
  964. *
  965. *   SEE ALSO
  966. *       IEditor/Expander.h, IEX_WriteCloseDown()
  967. *
  968. *****************************************************************************
  969. *
  970. */
  971. ///
  972. /// IEX_WriteSetup
  973. __geta4 void IEX_WriteSetup( __D0 UWORD ID, __A0 struct GenFiles *Files, __A1 struct IE_Data *IE )
  974. {
  975. }
  976. ///
  977. /// IEX_WriteCloseDown Doc
  978. /****** expander.library/IEX_WriteCloseDown *********************************
  979. *
  980. *   NAME
  981. *       IEX_WriteCloseDown
  982. *
  983. *   SYNOPSIS
  984. *       IEX_WriteCloseDown( ID, GenFiles, IE_Data );
  985. *                           D0     A0        A1
  986. *
  987. *       void IEX_WriteCloseDown( UWORD, struct GenFiles *, struct IE_Data * );
  988. *
  989. *   FUNCTION
  990. *       This function is invoked in the CloseDown routine, before
  991. *       the screen unlocking or closing.
  992. *
  993. *   INPUTS
  994. *       ID          -   your ID
  995. *       GenFiles    -   file BPTRs
  996. *       IE_Data     -   information about IE
  997. *
  998. *   RESULT
  999. *
  1000. *   NOTES
  1001. *
  1002. *   BUGS
  1003. *
  1004. *   SEE ALSO
  1005. *       IEditor/Expander.h, IEX_WriteSetup()
  1006. *
  1007. *****************************************************************************
  1008. *
  1009. */
  1010. ///
  1011. /// IEX_WriteCloseDown
  1012. __geta4 void IEX_WriteCloseDown( __D0 UWORD ID, __A0 struct GenFiles *Files, __A1 struct IE_Data *IE )
  1013. {
  1014. }
  1015. ///
  1016. /// IEX_WriteHeaders Doc
  1017. /****** expander.library/IEX_WriteHeaders ***********************************
  1018. *
  1019. *   NAME
  1020. *       IEX_WriteHeaders  -  Write your headers
  1021. *
  1022. *   SYNOPSIS
  1023. *       IEX_WriteHeaders( ID, GenFiles, IE_Data );
  1024. *                         D0     A0        A1
  1025. *
  1026. *       void IEX_WriteHeaders( UWORD, struct GenFiles *, struct IE_Data * );
  1027. *
  1028. *   FUNCTION
  1029. *       Write your headers into the GenFiles->XDef file.
  1030. *
  1031. *   INPUTS
  1032. *       ID          -   your ID
  1033. *       GenFiles    -   file BPTRs
  1034. *       IE_Data     -   information about IE
  1035. *
  1036. *   RESULT
  1037. *
  1038. *   NOTES
  1039. *
  1040. *   BUGS
  1041. *
  1042. *   SEE ALSO
  1043. *       IEditor/Expander.h, IEditor/generatorlib.h
  1044. *
  1045. *****************************************************************************
  1046. *
  1047. */
  1048. ///
  1049. /// IEX_WriteHeaders
  1050. __geta4 void IEX_WriteHeaders( __D0 UWORD ID, __A0 struct GenFiles *Files, __A1 struct IE_Data *IE )
  1051. {
  1052.     STRPTR string;
  1053.  
  1054.     if( string = ( *IE->IEXFun->GetFirstLine )( Desc, "HEADER" ))
  1055.     FPuts( Files->XDef, string );
  1056. }
  1057. ///
  1058. /// IEX_WriteRender Doc
  1059. /****** expander.library/IEX_WriteRender ************************************
  1060. *
  1061. *   NAME
  1062. *       IEX_WriteRender  -  Write your render routine
  1063. *
  1064. *   SYNOPSIS
  1065. *       IEX_WriteRender( ID, GenFiles, IE_Data );
  1066. *                        D0     A0        A1
  1067. *
  1068. *       void IEX_WriteRender( UWORD, struct GenFiles *, struct IE_Data * );
  1069. *
  1070. *   FUNCTION
  1071. *       This function is called by the generator in the <Wnd Label>Render
  1072. *       routine. If your object need some rendering instructions, then
  1073. *       you must write them into the source file.
  1074. *
  1075. *   INPUTS
  1076. *       ID          -   your ID
  1077. *       GenFiles    -   file BPTRs
  1078. *       IE_Data     -   information about IE
  1079. *
  1080. *   RESULT
  1081. *
  1082. *   NOTES
  1083. *
  1084. *   BUGS
  1085. *
  1086. *   SEE ALSO
  1087. *       IEditor/Expander.h, IEditor/generatorlib.h
  1088. *
  1089. *****************************************************************************
  1090. *
  1091. */
  1092. ///
  1093. /// IEX_WriteRender
  1094. __geta4 void IEX_WriteRender( __D0 UWORD ID, __A0 struct GenFiles *Files, __A1 struct IE_Data *IE )
  1095. {
  1096.     struct Descriptor   Dsc[] = {
  1097.     { 'w', IE->win_info->wi_Label },
  1098.     { 'o', NULL },
  1099.     { 0, NULL }
  1100.     };
  1101.     struct GaugeInfo   *gauge;
  1102.     STRPTR              String;
  1103.  
  1104.     if(( IE->win_info->wi_NumObjects ) && ( String = ( *IE->IEXFun->GetFirstLine )( Desc, "RENDER" ))) {
  1105.     for( gauge = IE->win_info->wi_Gadgets.mlh_Head; gauge->gi_Node.ln_Succ; gauge = gauge->gi_Node.ln_Succ ) {
  1106.         if( gauge->gi_Kind == ID ) {
  1107.         Dsc[1].Meaning = gauge->gi_Label;
  1108.         ( *IE->IEXFun->WriteFormatted )( Files->Std, String, &Dsc[0] );
  1109.         }
  1110.     }
  1111.     }
  1112. }
  1113. ///
  1114. /// IEX_GetIDCMP Doc
  1115. /****** expander.library/IEX_GetIDCMP ***************************************
  1116. *
  1117. *   NAME
  1118. *       IEX_GetIDCMP  -  Get the IDCMP you need
  1119. *
  1120. *   SYNOPSIS
  1121. *       IDCMP = IEX_GetIDCMP( ID, IDCMP, IE_Data );
  1122. *                             D0    D1      A0
  1123. *
  1124. *       ULONG IEX_GetIDCMP( UWORD, ULONG, struct IE_Data * );
  1125. *
  1126. *   FUNCTION
  1127. *       When called, this function must check if some objects fo your
  1128. *       kind are present in IE->win_info: if so, you should perform a
  1129. *       OR operation between the IDCMP passed by IE and the ones your
  1130. *       objects need to be fully functional.
  1131. *
  1132. *   INPUTS
  1133. *       ID          -   your ID
  1134. *       IDCMP       -   IDCMP of the window
  1135. *       IE_Data     -   information about IE
  1136. *
  1137. *   RESULT
  1138. *       IDCMP       -   new window IDCMPs
  1139. *
  1140. *   EXAMPLE
  1141. *       If your objects were Listviews, this is what your function should
  1142. *       look like:
  1143. *
  1144. *       ULONG IEX_GetIDCMP( __D0 UWORD ID, __D1 ULONG idcmp,
  1145. *                           __A0 struct IE_Data *IE )
  1146. *       {
  1147. *           struct MyObj    *obj;
  1148. *
  1149. *           for( obj = IE->win_info->wi_Gadgets.mlh_Head;
  1150. *                obj->Node.ln_Succ; obj = obj->Node.ln_Succ ) {
  1151. *
  1152. *               if( obj->Kind == ID )
  1153. *                   return( idcmp | LISTVIEWIDCMP );
  1154. *           }
  1155. *
  1156. *           return( idcmp );
  1157. *       }
  1158. *
  1159. *   NOTES
  1160. *       If your objects don't need any IDCMP, then you *must* return
  1161. *       the same IDCMP you received from IE.
  1162. *
  1163. *   BUGS
  1164. *
  1165. *   SEE ALSO
  1166. *       IEditor/Expander.h
  1167. *
  1168. *****************************************************************************
  1169. *
  1170. */
  1171. ///
  1172. /// IEX_GetIDCMP
  1173. __geta4 ULONG IEX_GetIDCMP( __D0 UWORD ID, __D1 ULONG idcmp, __A0 struct IE_Data *IE )
  1174. {
  1175.     return( idcmp );
  1176. }
  1177. ///
  1178. /// IEX_WriteData Doc
  1179. /****** expander.library/IEX_WriteData **************************************
  1180. *
  1181. *   NAME
  1182. *       IEX_WriteData  -  Write your data
  1183. *
  1184. *   SYNOPSIS
  1185. *       IEX_WriteData( ID, GenFiles, IE_Data );
  1186. *                      D0     A0        A1
  1187. *
  1188. *       void IEX_WriteData( UWORD, struct GenFiles *, struct IE_Data * );
  1189. *
  1190. *   FUNCTION
  1191. *       Write your objects' data into the file.
  1192. *
  1193. *   INPUTS
  1194. *       ID          -   your ID
  1195. *       GenFiles    -   file BPTRs
  1196. *       IE_Data     -   information about IE
  1197. *
  1198. *   RESULT
  1199. *
  1200. *   NOTES
  1201. *
  1202. *   BUGS
  1203. *
  1204. *   SEE ALSO
  1205. *       IEditor/Expander.h, IEditor/generatorlib.h
  1206. *
  1207. *****************************************************************************
  1208. *
  1209. */
  1210. ///
  1211. /// IEX_WriteData
  1212. __geta4 void IEX_WriteData( __D0 UWORD ID, __A0 struct GenFiles *Files, __A1 struct IE_Data *IE )
  1213. {
  1214.     UBYTE               X[6], Y[6], Width[6], Height[6], Freedom[4];
  1215.     struct Descriptor   Dsc[] = {
  1216.     { 'o', NULL },
  1217.     { 'x', X },
  1218.     { 'y', Y },
  1219.     { 'W', Width },
  1220.     { 'h', Height },
  1221.     { 'f', Freedom },
  1222.     { 0, NULL }
  1223.     };
  1224.     struct GaugeInfo   *gauge;
  1225.     struct WindowInfo  *wnd;
  1226.     STRPTR              Xdef, Data;
  1227.     static UBYTE        ld[] = "%ld";
  1228.  
  1229.     Xdef = ( *IE->IEXFun->GetFirstLine )( Desc, "EXTERN" );
  1230.     Data = ( *IE->IEXFun->GetFirstLine )( Desc, "DATA" );
  1231.  
  1232.     for( wnd = IE->win_list.mlh_Head; wnd->wi_succ; wnd = wnd->wi_succ ) {
  1233.     if( wnd->wi_NumObjects ) {
  1234.         for( gauge = wnd->wi_Gadgets.mlh_Head; gauge->gi_Node.ln_Succ; gauge = gauge->gi_Node.ln_Succ ) {
  1235.         if( gauge->gi_Kind == ID ) {
  1236.  
  1237.             Dsc[0].Meaning = gauge->gi_Label;
  1238.  
  1239.             if( Xdef )
  1240.             ( *IE->IEXFun->WriteFormatted )( Files->XDef, Xdef, &Dsc[0] );
  1241.  
  1242.             sprintf( X, ld, gauge->gi_Left - IE->ScreenData->XOffset );
  1243.             sprintf( Y, ld, gauge->gi_Top  - IE->ScreenData->YOffset );
  1244.             sprintf( Width, ld, gauge->gi_Width );
  1245.             sprintf( Height, ld, gauge->gi_Height );
  1246.             sprintf( Freedom, ld, gauge->gi_Freedom );
  1247.  
  1248.             if( Data )
  1249.             ( *IE->IEXFun->WriteFormatted )( Files->Std, Data, &Dsc[0] );
  1250.         }
  1251.         }
  1252.     }
  1253.     }
  1254. }
  1255. ///
  1256. /// IEX_WriteChipData Doc
  1257. /****** expander.library/IEX_WriteChipData **********************************
  1258. *
  1259. *   NAME
  1260. *       IEX_WriteChipData  -  Write your chip data
  1261. *
  1262. *   SYNOPSIS
  1263. *       IEX_WriteChipData( ID, GenFiles, IE_Data );
  1264. *                          D0     A0        A1
  1265. *
  1266. *       void IEX_WriteChipData( UWORD, struct GenFiles *, struct IE_Data * );
  1267. *
  1268. *   FUNCTION
  1269. *       Write your objects' chip data into the file.
  1270. *
  1271. *   INPUTS
  1272. *       ID          -   your ID
  1273. *       GenFiles    -   file BPTRs
  1274. *       IE_Data     -   information about IE
  1275. *
  1276. *   RESULT
  1277. *
  1278. *   NOTES
  1279. *
  1280. *   BUGS
  1281. *
  1282. *   SEE ALSO
  1283. *       IEditor/Expander.h, IEditor/generatorlib.h
  1284. *
  1285. *****************************************************************************
  1286. *
  1287. */
  1288. ///
  1289. /// IEX_WriteChipData
  1290. __geta4 void IEX_WriteChipData( __D0 UWORD ID, __A0 struct GenFiles *Files, __A1 struct IE_Data *IE )
  1291. {
  1292. }
  1293. ///
  1294. /// IEX_WriteOpenWnd Doc
  1295. /****** expander.library/IEX_WriteOpenWnd ***********************************
  1296. *
  1297. *   NAME
  1298. *       IEX_WriteOpenWnd  -  Write your open wnd code
  1299. *
  1300. *   SYNOPSIS
  1301. *       IEX_WriteOpenWnd( ID, GenFiles, IE_Data );
  1302. *                         D0     A0        A1
  1303. *
  1304. *       void IEX_WriteOpenWnd( UWORD, struct GenFiles *, struct IE_Data * );
  1305. *
  1306. *   FUNCTION
  1307. *       This function is called inside every Open<Wnd Label>Window routine,
  1308. *       just before opening the window. You can use it to write some code
  1309. *       needed by your objects that must be executed at that time.
  1310. *
  1311. *   INPUTS
  1312. *       ID          -   your ID
  1313. *       GenFiles    -   file BPTRs
  1314. *       IE_Data     -   information about IE
  1315. *
  1316. *   RESULT
  1317. *
  1318. *   NOTES
  1319. *
  1320. *   BUGS
  1321. *
  1322. *   SEE ALSO
  1323. *       IEditor/Expander.h, IEditor/generatorlib.h
  1324. *
  1325. *****************************************************************************
  1326. *
  1327. */
  1328. ///
  1329. /// IEX_WriteOpenWnd
  1330. __geta4 void IEX_WriteOpenWnd( __D0 UWORD ID, __A0 struct GenFiles *Files, __A1 struct IE_Data *IE )
  1331. {
  1332. }
  1333. ///
  1334. /// IEX_WriteCloseWnd Doc
  1335. /****** expander.library/IEX_WriteCloseWnd ***********************************
  1336. *
  1337. *   NAME
  1338. *       IEX_WriteCloseWnd  -  Write your close wnd code
  1339. *
  1340. *   SYNOPSIS
  1341. *       IEX_WriteCloseWnd( ID, GenFiles, IE_Data );
  1342. *                         D0     A0        A1
  1343. *
  1344. *       void IEX_WriteCloseWnd( UWORD, struct GenFiles *, struct IE_Data * );
  1345. *
  1346. *   FUNCTION
  1347. *       This function is called inside every Close<Wnd Label>Window routine,
  1348. *       just before closing the window. You can use it to write some code
  1349. *       needed by your objects that must be executed at that time.
  1350. *
  1351. *   INPUTS
  1352. *       ID          -   your ID
  1353. *       GenFiles    -   file BPTRs
  1354. *       IE_Data     -   information about IE
  1355. *
  1356. *   RESULT
  1357. *
  1358. *   NOTES
  1359. *
  1360. *   BUGS
  1361. *
  1362. *   SEE ALSO
  1363. *       IEditor/Expander.h, IEditor/generatorlib.h
  1364. *
  1365. *****************************************************************************
  1366. *
  1367. */
  1368. ///
  1369. /// IEX_WriteCloseWnd
  1370. __geta4 void IEX_WriteCloseWnd( __D0 UWORD ID, __A0 struct GenFiles *Files, __A1 struct IE_Data *IE )
  1371. {
  1372. }
  1373. ///
  1374.